home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / fscompr / compfile.bas < prev    next >
BASIC Source File  |  1997-12-23  |  897b  |  25 lines

  1. Attribute VB_Name = "modCompress"
  2. Option Explicit
  3.  
  4. Private Declare Function CompFile Lib "FSZLib" (ByVal OutputName As String, ByVal InputName As String, ByVal Level As Long, ByVal ProgressFunction As Long) As Long
  5. Private Declare Function DecompFile Lib "FSZLib" (ByVal OutputName As String, ByVal InputName As String, ByVal ProgressFunction As Long) As Long
  6.  
  7. Global gPerCent As Integer
  8.  
  9.  
  10. Function Progress(ByVal PerCent As Long) As Long
  11.     gPerCent = PerCent
  12.     Progress = 0
  13. End Function
  14.  
  15. Public Function CompressFile(OutputFile As String, InputFile As String, Level As fsCompressionLevel) As Integer
  16.     CompressFile = CompFile(OutputFile, InputFile, Level, AddressOf Progress)
  17.  
  18. End Function
  19.  
  20. Public Function DecompressFile(OutputFile As String, InputFile As String) As Integer
  21.     DecompressFile = DecompFile(OutputFile, InputFile, AddressOf Progress)
  22.  
  23. End Function
  24.  
  25.